[Regexp] Stop matching when meeting a sequence of chars: fixing a lookbehind
Posted
by CFP
on Stack Overflow
See other posts from Stack Overflow
or by CFP
Published on 2010-04-03T08:11:22Z
Indexed on
2010/04/03
8:13 UTC
Read the original article
Hit count: 443
Hello everyone!
I have the following regexp:
(?P<question>.+(?<!\[\[))
It is designed to match hello world!
in the string hello world! [[A string typically used in programming examples]]
Yet I just matches the whole string, and I can't figure out why. I've tried all flavors of lookaround, but it just won't work...
Anyone knows how to fix this problem?
Thanks,
CFP.
© Stack Overflow or respective owner